The present invention relates to computer graphics and, in particular, to the generation of overlapping texture mapped regions, including parametrically defined colour blends.
The display of graphical objects involves considering many issues which influence various aspects of the image being displayed. Examples of such issues include the actual colour being displayed and the time taken to determine (render) the colour to be displayed. Where graphical objects are opaque, these issues are relatively simple. However, transparent and partly transparent objects complicate issues, particularly where the colour and/or opacity of an object changes or varies within the object boundaries. Specific problems arise where an object is self-overlapping and the displayed colour is a textural blend of varying colours from the overlapping portions.
It is an object of the present invention to provide a manner in which such self-overlapping regions may be faithfully rendered in a convenient fashion.
In accordance with one aspect of the present invention there is disclosed a method of determining a displayable colour in a self-overlapping region of a variable colour object, said method comprising the steps of:
determining, for each point in the region, the colour of each portion of the object present at that point;
at each said point, averaging the colours present at that point; and
outputting said averaged colours for reproductions within said region.
In accordance with another aspect of the present invention there is disclosed a method of determining a displayable colour in a self-overlapping region of a variable colour object characterised by the use of a commutative operator that mixes a plurality of colours in an order independent manner.
In accordance with another aspect of the present invention there is disclosed a commutative operator for mixing colours having opacity components, said operator being of the form:             (                                    ∑                                          c                i                            ⁢                                                o                  i                                /                n                                                          ∑                                          o                i                            /              n                                      ,                              over                          i              =              1                        n                    ⁢                      xe2x80x83                    ⁢                      o            i                              )        =          (                                    ∑                                          c                i                            ⁢                              o                i                                                          ∑                          o              i                                      ,                              over                          i              =              1                        n                    ⁢                      xe2x80x83                    ⁢                      o            i                              )        ,
where                     over                  i          =          1                n            ⁢              xe2x80x83            ⁢              o        i              =                  ∑                  i          =          1                n            ⁢                        o          i                ⁢                              ∏                          j              =                              i                +                1                                      n                    ⁢                      (                          1              -                              o                i                                      )                                ,
In accordance with another aspect of the present invention there is disclosed a method of determining self-overlapping regions of a graphical object, characterised by using the non-zero winding fill rule to accumulate edge transitions of said object in a scan line by scan line fashion.
In accordance with another aspect of the present invention there is disclosed a method for rendering in a scan-line manner an arbitrary object having at least overlapping region, said method comprising the steps of:
for each scan line of said object
(a) scan converting the object on said scan line
(b) determining the overlapping regions of said object within said scan line;
(c) initializing a overlap buffer for each said overlapping regions
(d) for each portion of the object on said scan line
(da) determining if said portion is an overlapping region
(daa) if so, accumulating the colour of pixels of said portion in the corresponding said overlap buffer;
(dab) if not, writing the colour of pixels to an output buffer;
(e) for each overlapping region, calculating an average colour from the corresponding accumulated value in said corresponding overlap buffer;
(f) writing the average colours to said output buffer; and
(g) transferring values from said output buffer to an output device.
In accordance with another aspect of the present invention there is disclosed an apparatus for determining a displayable colour in a self-overlapping region of a variable colour object, said apparatus comprising:
colour determination means for determining, for each point in the region, the colour of each portion of the object present at that point;
averaging means, responsive to said colour determination means, adapted to average, at each said point, the colours present at that point; and
output means coupled to said averaging means for outputting said averaged colours for reproductions within said region.
In accordance with another aspect of the present invention there is disclosed an apparatus for determining a displayable colour in a self-overlapping region of a variable colour object characterised by comprising a commutative operator means adapted to mix a plurality of colours in an order independent manner.
In accordance with another aspect of the present invention there is disclosed a commutative operator means for mixing colours having opacity components, said operator means adapted to perform the operation:             (                                    ∑                                          c                i                            ⁢                                                o                  i                                /                n                                                          ∑                                          o                i                            /              n                                      ,                              over                          i              =              1                        n                    ⁢                      xe2x80x83                    ⁢                      o            i                              )        =          (                                    ∑                                          c                i                            ⁢                              o                i                                                          ∑                          o              i                                      ,                              over                          i              =              1                        n                    ⁢                      xe2x80x83                    ⁢                      o            i                              )        ,
where                     over                  i          =          1                n            ⁢              xe2x80x83            ⁢              o        i              =                  ∑                  i          =          1                n            ⁢                        o          i                ⁢                              ∏                          j              =                              i                +                1                                      n                    ⁢                      (                          1              -                              o                i                                      )                                ,
In accordance with another aspect of the present invention there is disclosed an apparatus for determining self-overlapping regions of a graphical object, characterised by comprising a non-zero winding fill rule means to accumulate edge transitions of said object in a scan line by scan line fashion.
In accordance with another aspect of the present invention there is disclosed an apparatus for rendering in a scan-line manner an arbitrary object having at least overlapping region, said apparatus comprising:
for each scan line of said object
(a) scan conversion means for scan converting the object on said scan line
(b) overlapping region detection means for determining the overlapping regions of said object within said scan line;
(c) buffer initialization means for initializing an overlap buffer for each said overlapping regions
(d) overlapping region determination means, operative in respect of each portion of the object on said scan line
(da) for determining if said portion is an overlapping region
(daa) and, if said portion is an overlapping region, adapted to accumulate the colour of pixels of said portion in the corresponding said overlap buffer;
(dab) and, if said portion is not an overlapping region, adapted to write the colour of pixels to an output buffer;
(e) calculation means, operative in respect of each overlapping region, to calculate an average colour from the corresponding accumulated value in said corresponding overlap buffer;
(f) writing means for writing the average colours to said output buffer; and
(g) transferring means for transferring values from said output buffer to an output device.
In accordance with another aspect of the present invention there is disclosed a computer program product including a computer readable medium incorporating a series of instructions configured to determine a displayable colour in a self-overlapping region of a variable colour object, said instructions comprising:
determination steps for determining, for each point in the region, the colour of each portion of the object present at that point;
averaging steps for at each said point, averaging the colours present at that point; and
outputting steps for outputting said averaged colours for reproductions within said region.
In accordance with another aspect of the present invention there is disclosed a computer program product for determining a displayable colour in a self-overlapping region of a variable colour object characterised by comprising commutative operator steps adapted to mix a plurality of colours in an order independent manner.
In accordance with another aspect of the present invention there is disclosed a computer program product comprising commutative operator steps for mixing colours having opacity components, said operator steps adapted to perform the operation:             (                                    ∑                                          c                i                            ⁢                                                o                  i                                /                n                                                          ∑                                          o                i                            /              n                                      ,                              over                          i              =              1                        n                    ⁢                      xe2x80x83                    ⁢                      o            i                              )        =          (                                    ∑                                          c                i                            ⁢                              o                i                                                          ∑                          o              i                                      ,                              over                          i              =              1                        n                    ⁢                      xe2x80x83                    ⁢                      o            i                              )        ,
where                     over                  i          =          1                n            ⁢              xe2x80x83            ⁢              o        i              =                  ∑                  i          =          1                n            ⁢                        o          i                ⁢                              ∏                          j              =                              i                +                1                                      n                    ⁢                      (                          1              -                              o                i                                      )                                ,
In accordance with another aspect of the present invention there is disclosed a computer program product for determining self-overlapping regions of a graphical object, characterised by comprising non-zero winding fill rule steps to accumulate edge transitions of said object in a scan line by scan line fashion.
In accordance with another aspect of the present invention, there is provided computer program product for rendering in a scan-line manner an arbitrary object having at least overlapping region, said program comprising:
for each scan line of said object
(a) scan conversion steps for scan converting the object on said scan line
(b) overlapping region detection steps for determining the overlapping regions of said object within said scan line;
(c) buffer initialization steps for initializing a overlap buffer for each said overlapping regions
(d) overlapping region determination steps, operative in respect of each portion of the object on said scan line
(da) for determining if said portion is an overlapping region
(daa) and, if said portion is an overlapping region, adapted to accumulate the colour of pixels of said portion in the corresponding said overlap buffer;
(dab) and, if said portion is not an overlapping region, adapted to write the colour of pixels to an output buffer;
(e) calculation steps, operative in respect of each overlapping region, to calculate an average colour from the corresponding accumulated value in said corresponding overlap buffer;
(f) writing steps for writing the average colours to said output buffer; and
(g) transferring steps for transferring values from said output buffer to an output device.